<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="../../public/templateMenu.xhtml"
                >

    <ui:define name="conteudo">
        <h:form>
            <p:panel header="Cadastro de Eventos" 
                     >
                
                <h:panelGrid columns="2" style="font-size: 12px; border: black">
                    <h:outputLabel  value="Inicio do Evento: "/>
                    <p:calendar id="inicio" value="#{eventoBean.evento.inicio}" 
                                 label="Inicio Evento" pattern="dd/MM/yyyy"/>

                    <h:outputLabel value="Final do Evento: "/>
                    <p:calendar  id="final" value="#{eventoBean.evento.final1}" 
                                 label="Final Evento" pattern="dd/MM/yyyy"/>

                    <h:outputLabel value="Nome do Evento: "/>
                    <h:inputText id="nomeE" 
                                 value="#{eventoBean.evento.nome}" />

                    <h:outputLabel  value="Crie uma Senha: "/>
                    <h:inputText id="senha" value="#{eventoBean.evento.senha}" />

                    <h:outputLabel value="Status do Evento: "/>
                    <h:selectOneMenu id="status"
                                     style="width: 200px" value="#{eventoBean.evento.status}">
                        <f:selectItem itemLabel="Selecione o Status" itemValue=""/>
                        <f:selectItem itemLabel="Iniciado" itemValue="I"/>
                        <f:selectItem itemLabel="Finalizado" itemValue="F"/>
                    </h:selectOneMenu>

                    <h:outputLabel value="Descrição do Evento: "/>
                    <h:inputTextarea id="descricaoE" value="#{eventoBean.evento.descricao}" label="Descricao" rows="5" cols="40"
                                     style="width: 300px; height: 100px"
                                     />
                </h:panelGrid>

                <div align="south">
                    <h:form>
                        <h:panelGrid columns="4" style="width: 100px; height: 50px">
                            <p:commandButton value="Salvar" action="#{eventoBean.salvar()}" icon="ui-icon-disk"/>
                            <p:commandButton value="Limpar" type="reset" icon="ui-icon-clean"/>
                            <p:commandButton value="Cancelar" action="/cadastro/evento/listaEventos.xhtml" icon="ui-icon-arrowrefresh-1-w"/>
                        </h:panelGrid>
                    </h:form>
                </div>
            </p:panel>
        </h:form>
    </ui:define>

</ui:composition>
    
    </html>
